file='guest_book.py'
with open(file,'w') as file_object:
    while True:
        message=input('请输入你的名字')
        if message == 'quit':
            break
        else:
            file_object.write(message+'\n')
            file_object.write('I love you')